www.gusucode.com > 落叶冰点万能企业网站内容管理系统 V9.1 > 落叶冰点万能企业网站内容管理系统 V9.1\code\admin\adminModelComponentLabel\D_chk_edit_custom_cont_loop_label.asp
<% '************************************************************** ' 新动软网站管理系统 ' 官方网站: http://www.aspcpu.com ' 系统作者: 阮丁远(网名:天下程序) ' Copyright 新动软网站管理系统 版权所有 '************************************************************** %> <htmL> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <LINK href="../css.css" type=text/css rel=stylesheet> <% dir_set="../../" %> <!--#include file=../../inc/conn.asp--> <!--#include file=../../inc/Functionb.asp--> <!--#include file=../../inc/ajaxLIB.asp--> <!--#include file=../inc/checkadmin2.asp--> <!--#include file=../../inc/functionFiless.asp--> <!--#include file=../../inc/ND_class_function.asp--> <!--#include file=conn_m.asp--> <% AJAXshowLoader() %> <% if find_dataw("qitashezhi123","0",7)<>"1" and qx_if_max=0 then response.redirect "../D_suodinguser.asp" end if %> <% session("newdsoft_selct_a_lable_bef_haved")="" '========================================================== ztypee=request("labeltype") if ztypee<>"" then fph=left(request("fname"),len(request("fname"))-1) fph2=split(fph,"/") muluzz="" for ii2=0 to ubound(fph2)-1 muluzz=muluzz&fph2(ii2)&"/" next sss1=loadfile("../../Model/ComponentLabels/"&muluzz&"index_componentlabel.asp") if instr(1,sss1,"$componentlabelname:",1)<>0 then nd1_m_label_name=trim(mid(sss1,instr(1,sss1,"$componentlabelname:",1)+20,instr(1,sss1,"$end_componentlabelname",1)-(instr(1,sss1,"$componentlabelname:",1)+20))) else nd1_m_label_name="" end if if instr(1,sss1,"$componentlabelcixu:",1)<>0 then nd1_m_label_cixu=trim(mid(sss1,instr(1,sss1,"$componentlabelcixu:",1)+20,instr(1,sss1,"$end_componentlabelcixu",1)-(instr(1,sss1,"$componentlabelcixu:",1)+20))) else nd1_m_label_cixu="" end if if instr(1,sss1,"$is_sys_componentlabel:",1)<>0 then nd1_m_label_is_sys=trim(mid(sss1,instr(1,sss1,"$is_sys_componentlabel:",1)+23,instr(1,sss1,"$end_is_sys_componentlabel",1)-(instr(1,sss1,"$is_sys_componentlabel:",1)+23))) else nd1_m_label_is_sys="" end if if ztypee="addmode" then hzzza="addmode" filezza="addmode_label.asp" end if if ztypee="editmode" then hzzza="editmode" filezza="editmode_label.asp" end if if ztypee="showmode" then hzzza="showmode" filezza="showmode_label.asp" end if if ztypee="do_add_mode" then hzzza="doaddmode" filezza="do_add_mode_label.asp" end if if ztypee="do_edit_mode" then hzzza="doeditmode" filezza="do_edit_mode_label.asp" end if end if if ztypee<>"" then bname="$"&hzzza&"$-ComponentLabel-$" else bname=request("bnm") end if if nd1_m_label_is_sys="1" then %> <script language=javascript> alert("系统控件无法被修改(因为其标签参数被系统所调用),修改失败! ,你可以尝试把系统控件复制为控件副本,再编辑此控件副本"); history.go(-1); </script> <% '======================================================== else ss4=request("fname") ss4=left(ss4,len(ss4)-1) '去掉最后一个/号 strDBPath1= left(ss4,instrrev(ss4,"/")) sssssss1="" for i=1 to len(ss4) if mid(ss4,len(ss4)-i+1,1)="/" then sssssss1=i exit for end if next if sssssss1<>"" then sssssss1=right(ss4,sssssss1-1) else sssssss1=ss4 strDBPath1="" end if 'strDBPath1=路径 'filename=文件名 filename=sssssss1 set filea=new Cls_FSO fpath=strDBPath1 bname3=filename cont=request("Content") bname_err=0 if bname="" then bname_err=1 end if Dim regEx Set regEx = New RegExp ' 建立正则表达式。 regEx.Pattern = "^[A-Za-z0-9_]+$" ' 设置模式。 regEx.IgnoreCase = False ' 设置是否区分大小写。 retVal = regEx.Test(bname) ' 执行搜索测试。 If retVal<>true and ztypee="" Then bname_err=1 End If if bname_err=1 then %> <script language=javascript> alert("标签名为空 或者 不是字母+数字及_号的组合"); history.go(-1); </script> <% response.end else bname1=bname params_str="" for iit=1 to cint(request("params_len")) if trim(request("c"&cstr(iit)))<>"" then sss1=replace(replace(trim(request("c"&cstr(iit))),",",""),"|","") sss2=replace(replace(trim(request("s"&cstr(iit))),",", "," ),"|","") params_str=params_str&sss1&","&sss2&"|" end if next if params_str<>"" then params_str=left(params_str,len(params_str)-1) end if par=split(params_str,"|") '----h2--------- yooo=0 yooo2=0 for iiii=0 to ubound(par) sss33=split(par(iiii),",") sss3=sss33(0) for iiiii=0 to ubound(par) sss44=split(par(iiiii),",") sss4=sss44(0) if sss3=sss4 and cint(iiiii)<>cint(iiii) then yooo=1 yooo2=1 end if next next errhhhtd=0 '----end h2--------- if yooo=1 then '----h3--------- if yooo2=1 then %> <script language=javascript> alert("发现参数列表中有同名参数,必须每个参数都不同名字!"); history.go(-1); </script> <% response.end end if if errhhhtd=1 then %> <script language=javascript> alert("发现 本标签生成html静态页时的选项2 里填写的某个项的 开始asp代码的自定义开始标记 或 结束asp代码的自定义结束标记 里含以下的一个或多个不允许出现的字符:\n\n \" \' \, \: \| "); history.go(-1); </script> <% response.end end if '----end h3--------- else sql=replace_asp(request("sqlms")) mode1=cstr(replace_asp(request("mode1"))) lbsm=replace_asp(trim(request("lbsm"))) fenyenum=replace_asp(request("fenye")) iffen=replace_asp(request("iffen")) di2xh_num=replace_asp(request("di2xh_num")) rscname=trim(replace_asp(request("rsname"))) 'loop_label_one_loop run_asp_1_1=replace_asp(request("run_asp_1_1")) '每次循环前要执行的asp代码(可以为空) ksdaima=replace_asp(request("ksdaima")) '每次循环的开始html代码输出(支持写入asp代码与标签) 'Content111=request("Content") if request("eemode")="1" then Content111=trim(request("Contentt")) else Content111=trim(request("Content")) end if jiesdaima=replace_asp(request("jiesdaima")) '每次循环的结束html代码输出(支持写入asp代码与标签): 'loop_label_two_loop run_asp1=replace_asp(request("run_asp1"))'第一层循环(如行循环)的每次循环前要执行的asp代码 run_asp2=replace_asp(request("run_asp2"))'第二层循环(如列循环)的每次循环前要执行的asp代码(可以为空) yi_ksdaima2=replace_asp(request("yi_ksdaima2"))'第一层循环(如行循环)的每次循环的开始html代码输出(支持写入asp代码与标签) ksdaima2=replace_asp(request("ksdaima2"))'第二层循环(如列循环)的每次循环的开始html代码输出(支持写入asp代码与标签) 'Content2=request("Content2")'循环体html代码输出(支持写入asp代码与标签) if request("eemode")="1" then Content2=trim(request("Content2t")) else Content2=trim(request("Content2")) end if jiesdaima2=replace_asp(request("jiesdaima2"))'第二层循环(如列循环)的每次循环的结束html代码输出(支持写入asp代码与标签): yi_jiesdaima22=replace_asp(request("yi_jiesdaima22"))'第一层循环(如行循环)的每次循环的结束html代码输出(支持写入asp代码与标签) hhks1=replace_asp(request("globa_qian_asp")) hhend1=replace_asp(request("globa_end_asp")) hhks2=replace_asp(request("globa_qian_asp2")) hhend2=replace_asp(request("globa_end_asp2")) sql_run=replace_asp(request("sql_run")) sql_run2=replace_asp(request("sql_run2")) 'if fenyenum="" or isnumeric(fenyenum)=0 then if fenyenum="" then %> <script language=javascript> alert("每页显示数量必填!"); history.go(-1); </script> <% else 'if (di2xh_num="" or isnumeric(di2xh_num)=0 ) and mode1="2" then if (di2xh_num="" ) and mode1="2" then %> <script language=javascript> alert("第二层循环的循环次数 必填!"); history.go(-1); </script> <% else if trim(sql)="" then %> <script language=javascript> alert("查询sql语句 不能为空!"); history.go(-1); </script> <% else if mode1="1" then if trim(rscname)="" then rscname="rs_x2" 'asc(60)=<,asc(37)=%,chr(13)=enter,chr(62)=> ext1=chr(60)&chr(37)&"'$start_ext_newDsoft 以下系统生成,勿删!"&vbcrlf&"'$newDsoft_label_type$:"&"loop_label_one_loop"&"$end_newDsoft_label_type$"&vbcrlf ext1=ext1&"'$newDsoft_label_name$:"&bname1&"$end_newDsoft_label_name$"&vbcrlf ext1=ext1&"'$newDsoft_label_sql$:"&sql&"$end_newDsoft_label_sql$"&vbcrlf ext1=ext1&"'$newDsoft_label_params$:"¶ms_str&"$end_newDsoft_label_params$"&vbcrlf ext1=ext1&"'$newDsoft_label_fenye_num$:"&fenyenum&"$end_newDsoft_label_fenye_num$"&vbcrlf ext1=ext1&"'$newDsoft_label_beizhu$:"&lbsm&"$end_newDsoft_label_beizhu$"&vbcrlf ext1=ext1&"'$newDsoft_is_sys_label$:"&"0"&"$end_newDsoft_is_sys_label$"&vbcrlf ext1=ext1&"'$newDsoft_other_params$:"&"hhend:"&hhend1&"|hhks:"&hhks1&"|sql_run:"&sql_run&"|iffen:"&iffen&"|run_asp_1_1:"&run_asp_1_1&"|ksdaima:"&ksdaima&"|jiesdaima:"&jiesdaima&"|rsname:"&rscname&"|htmledxa:"&htmledxa&"|htmledxb:"&htmledxb&"$end_newDsoft_other_params$"&vbcrlf ext1=ext1&"'$end_ext_newDsoft"&chr(37)&chr(62) if savefile(ext1&huanyuan_textare_for_editor(Content111),"../../Model/ComponentLabels/"&fpath&bname3)=true then %> <!--#include file=D_set_need_complied.asp--> <% '--------------------------add1 cont11=loadfile("../../Model/ComponentLabels/"&fpath&bname3) call get_info_array_from_label_file_content(cont11) if ztypee<>"" then nd1_l_name=nd1_m_label_name&"$"&hzzza&"$" end if set rs4aa=server.CreateObject("adodb.recordset") rs4aa.open "select * from ND_label_cachem where lcase(label_name)='"&nd1_l_name&"'",conn2,1,1 set rs4=server.CreateObject("adodb.recordset") if not rs4aa.eof then rs4.open "select * from ND_label_cachem where lcase(label_name)='"&nd1_l_name&"'",conn2,1,3 else rs4.open "select * from ND_label_cachem",conn2,1,3 rs4.addnew end if rs4("label_code")=huanyuan_textare_for_editor(nd1_label_code) rs4("label_name")=nd1_l_name rs4("label_full_path_name")=trim("Model/ComponentLabels/"&fpath&bname3) rs4("label_params")=nd1_label_params rs4("label_type")=nd1_label_type rs4("label_sql")=nd1_label_sql rs4("label_fenye_num")=nd1_label_fenye_num rs4("label_beizhu")=nd1_label_beizhu rs4("is_sys_label")="0" rs4("label_other_params")=nd1_other_params rs4.update rs4.close set rs4=nothing '--------------------------add1 sssp=fpath sssspq=split(sssp,"/") ooosss="" for iii=0 to ubound(sssspq)-2 ooosss=ooosss&sssspq(iii)&"/" next %> <script language=javascript> alert("修改成功!"); self.location="D_admin_custom_label.asp?fpath=<%=ooosss%>"; </script> <% end if else if mode1="2" then if trim(rscname)="" then rscname="rs_x1" 'asc(60)=<,asc(37)=%,chr(13)=enter,chr(62)=> ext1=chr(60)&chr(37)&"'$start_ext_newDsoft 以下系统生成,勿删!"&vbcrlf&"'$newDsoft_label_type$:"&"loop_label_two_loop"&"$end_newDsoft_label_type$"&vbcrlf ext1=ext1&"'$newDsoft_label_name$:"&bname1&"$end_newDsoft_label_name$"&vbcrlf ext1=ext1&"'$newDsoft_label_sql$:"&sql&"$end_newDsoft_label_sql$"&vbcrlf ext1=ext1&"'$newDsoft_label_params$:"¶ms_str&"$end_newDsoft_label_params$"&vbcrlf ext1=ext1&"'$newDsoft_label_fenye_num$:"&fenyenum&"$end_newDsoft_label_fenye_num$"&vbcrlf ext1=ext1&"'$newDsoft_label_beizhu$:"&lbsm&"$end_newDsoft_label_beizhu$"&vbcrlf ext1=ext1&"'$newDsoft_is_sys_label$:"&"0"&"$end_newDsoft_is_sys_label$"&vbcrlf ext1=ext1&"'$newDsoft_other_params$:"&"hhend:"&hhend2&"|hhks:"&hhks2&"|sql_run:"&sql_run2&"|iffen:"&iffen&"|di2xh_num:"&di2xh_num&"|run_asp1:"&run_asp1&"|run_asp2:"&run_asp2&"|yi_ksdaima2:"&yi_ksdaima2&"|ksdaima2:"&ksdaima2&"|jiesdaima2:"&jiesdaima2&"|yi_jiesdaima22:"&yi_jiesdaima22&"|rsname:"&rscname&"|htmledxa:"&htmledxa&"|htmledxb:"&htmledxb&"$end_newDsoft_other_params$"&vbcrlf ext1=ext1&"'$end_ext_newDsoft"&chr(37)&chr(62) if savefile(ext1&huanyuan_textare_for_editor(Content2),"../../Model/ComponentLabels/"&fpath&bname3)=true then %> <!--#include file=D_set_need_complied.asp--> <% '--------------------------add1 cont11=loadfile("../../Model/ComponentLabels/"&fpath&bname3) call get_info_array_from_label_file_content(cont11) if ztypee<>"" then nd1_l_name=nd1_m_label_name&"$"&hzzza&"$" end if set rs4aa=server.CreateObject("adodb.recordset") rs4aa.open "select * from ND_label_cachem where lcase(label_name)='"&nd1_l_name&"'",conn2,1,1 set rs4=server.CreateObject("adodb.recordset") if not rs4aa.eof then rs4.open "select * from ND_label_cachem where lcase(label_name)='"&nd1_l_name&"'",conn2,1,3 else rs4.open "select * from ND_label_cachem",conn2,1,3 rs4.addnew end if rs4("label_code")=huanyuan_textare_for_editor(nd1_label_code) rs4("label_name")=nd1_l_name rs4("label_full_path_name")=trim("Model/ComponentLabels/"&fpath&bname3) rs4("label_params")=nd1_label_params rs4("label_type")=nd1_label_type rs4("label_sql")=nd1_label_sql rs4("label_fenye_num")=nd1_label_fenye_num rs4("label_beizhu")=nd1_label_beizhu rs4("is_sys_label")="0" rs4("label_other_params")=nd1_other_params rs4.update rs4.close set rs4=nothing '--------------------------add1 sssp=fpath sssspq=split(sssp,"/") ooosss="" for iii=0 to ubound(sssspq)-2 ooosss=ooosss&sssspq(iii)&"/" next %> <script language=javascript> alert("修改成功!"); self.location="D_admin_custom_label.asp?fpath=<%=ooosss%>"; </script> <% end if else %> <script language=javascript> alert("暂时不支持大于2层的循环!"); history.go(-1); </script> <% end if end if end if end if end if end if end if end if %> <% AJAXcloseLoader() %> </html>